﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ShapeAppMvc;

namespace ShapeAppMvc.Controllers
{
    public class HomeController : Controller
    {
        List<Shape> shapes = new List<Shape>();
        public ActionResult Index()
        {
            Circle circle = new Circle()
            {
                Radius = 5,
            };
            Rectangle rect = new Rectangle()
            {
                Length = 2,
                Width = 3
            };
            Triangle tri = new Triangle()
            {
                Base = 3,
                Height = 3
            };
            
            shapes.Add(circle);
            shapes.Add(rect);
            shapes.Add(tri);
            ViewBag.Shapes = shapes;
            return View(shapes);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }

        public ActionResult Foo()
        {
            return View();
        }
    }
    
}